package com.vito.dcs.pad.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.vito.base.factory.IDFactory;
import com.vito.dcs.pad.dao.PadBindMapper;
import com.vito.dcs.pad.service.PadBindService;

@Service
public class PadBindServiceImpl implements PadBindService{

	@Autowired
	private PadBindMapper padBindMapper;
	
	@Override
	public void savePadBind(Map<String, Object> map) {
		
		String id = IDFactory.getIDFactory().getIdInc("tbl_dcs_pad_bind") + "";
		map.put("id", id);
		
		padBindMapper.deletePadBind(map);
		padBindMapper.savePadBind(map);
	}

	@Override
	public Map<String, Object> queryPadBind(Map<String, Object> map) {
		return padBindMapper.queryPadBind(map);
	}

	@Override
	public List<Map<String, Object>> queryCascadeTree(Map<String, Object> map) {
		return padBindMapper.queryCascadeTree(map);
	}

	@Override
	public List<Map<String, Object>> queryVehicleBySectionId(
			Map<String, Object> map) {
		return padBindMapper.queryVehicleBySectionId(map);
	}

}
